/*
 * Copyright (C) 2009-2011 Knowings
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License version 3
 * as published by the Free Software Foundation.
 *

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */
package com.knowings.tbs.options;

import java.util.List;

import com.knowings.tbs.io.InvalidFormatException;
import com.knowings.tbs.io.UnsupportedFormatException;
import com.knowings.tbs.permission.PermissionException;

/**
 * Interface describing the features implemented when a TBS Kernel declares the
 * ITBSKernel.OPTION_BULK_IMPORT_SUPPORTED.
 * 
 * @author privarola
 */
public interface IBulkImportOption {
  /**
   * Method importing one or several traces defined in a text. The annotations will also be imported.
   * @param content the text describing one or several traces and annotations in the given format
   * @param format the import format
   * @return the UIDs of the imported traces 
   * @throws PermissionException if the connected user does not have the right to create a trace
   * @throws UnsupportedFormatException if the input format is not supported
   * @throws InvalidFormatException if the input content does not respect the specified format
   */
  public List<String> importTraces(String content, String format) throws PermissionException,
      UnsupportedFormatException, InvalidFormatException;
}
